using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;
using Outlook = Microsoft.Office.Interop.Outlook;
using Office = Microsoft.Office.Core;

namespace GCalSync
{
    class GlobalObjects
    {
        //internal static CoreSettings applicationSettings;
        /// <summary>
        /// Holds a reference to the Outlook Application that it was loaded from. 
        /// </summary>
        internal static ThisApplication outlookApplication;

        /// <summary>
        /// contains a reference to the current Outlook Explorer.
        /// </summary>
        internal static Outlook.Explorer activeExplorer;

        /// <summary>
        /// Messy array of object that you do not want dumped. No referencing
        /// of the item occurs.
        /// 
        /// </summary>
        //TODO: Create a internal system of holding objects, with expiry.
        internal static ArrayList internalObjects;

        public GlobalObjects(ThisApplication app)
        {
            //applicationSettings = new CoreSettings();
            outlookApplication = app;
            internalObjects = new ArrayList();
        }

        public static void AddObject(object item)
        {
            internalObjects.Add(item);
        }

        ~GlobalObjects()
        {
            //applicationSettings = null;
            outlookApplication = null;
        }
    }
}
